Conventionally constructed computer systems include a network processing layer as part of the kernel to facilitate the transmission and receipt of data over a networked system. Network Interface Cards (NIC's) are commonly used to enable computers to be connected with other systems in a network.
Commonly, when message packets arrive at a receiving computer system they are processed by the network processing stack of the kernel (e.g., the network protocol stack (also referred to as the TCP/IP stack) and the upper layer protocol layer (the ULP layer). With the steadily increasing capabilities of modern NIC's, throughput of on the order of 1 Gb/s (gigabit per second) is possible. Although advantageous from a data transfer perspective, such high data transfer rates can, and often, do overwhelm a host CPU. In fact, the processing in the TCP layer and IP layer can so occupy the CPU kernel, that in many cases, the kernel spends between 70 and 80 percent (or more) of the total CPU resources processing packets. Thus, little other data processing can be performed in the CPU. As a result, little processing power remains for the implementation of applications. This can drastically compromise system efficiency.
Conventionally employed computer systems commonly use one or more central processing units (CPU's) to conduct processing within a computer system. Commonly, such computer systems are configured to include a kernel layer and a user layer. As is known to those having ordinary skill in the art, the user layer includes a multiplicity of applications and programs which can receive information processed by the CPU at the kernel layer.
Additionally, computer systems can be interconnected in networked systems. Examples include, but are not limited, to local area networks (LAN's) and the much vaster Internet. Typically, such computer systems are connected to networks using network interface cards (NIC's) which are specially constructed pieces of hardware designed for such purposes.
Commonly, when a network message is received by a NIC it is decoded by the kernel layer in a series of steps and then sent to an end user (application) for processing and use. Although simple in conception this process can be quite involved. A typical network message includes a series of protocol headers (e.g., L1-L4) encapsulating a data package. The protocol headers enable the network message to negotiate the various system and network layers used to facilitate message traffic.
In one example, a message it transmitted to a local computer in accordance with a conventional process as commonly employed. A network message including message data is encapsulated with a series of headers. A data link layer (e.g., Ethernet, FDDI, or another data link header) encapsulates the message. Also, a transport layer header encapsulates the message. Such transport layer headers can include TCP (Transmission Control Protocol) headers. A network layer header also encapsulates the message. Such transport layer headers can include IP (Internet Protocol) headers and the like. Also, the message data is encapsulated by application layer protocol headers like NFS and HTTP headers. Before, the message data package can be transmitted to the end user (typically an application program operating in the user layer of a local computer system) the headers must be decoded and interpreted.
Typical networked computer systems are commonly configured as follows. The computer system includes an operating system (O/S) arranged to include a user layer and a kernel layer. The user layer is configured to operate the applications (i.e., software) stored on the computer. As is known to those having ordinary skill in the art the kernel is configured to execute a wide variety of processing tasks. The kernel layer includes a socket layer which interfaces the kernel layer with the applications in the user layer. Also, the kernel layer includes a driver layer that enables communication between the kernel layer and the NIC. Additionally, the kernel level includes a protocol stack used for decoding the various protocol headers used in the messages.
The computer system communicates with the network using the NIC that connects the computer system with a network. The NIC communicates with the operating system (O/S) via a NIC driver. Also, the NIC communicates with the driver using an I/O bus. Network messages are received at the NIC where they are stored in NIC memory. The messages are then copied (using a direct memory access (DMA) process) to a kernel buffer and decoded using the protocol stack of the kernel layer. The decoded messages are then copied to a final location in the user buffer in the user layer where they are processed by the appropriate applications. All of this processing is performed by the kernel and generates significant network processing overhead (time spent processing network messages). As network message traffic increases more and more CPU time is being devoted to processing network messages. Conversely, due to this increasing overhead, less and less CPU time is available to conduct processing of other operations. This has a significant impact on the usefulness of such computer systems.
The following example provides a brief exemplary overview of a conventional network message processing operation used for dealing with network messages in accordance with current processes. A network message is transmitted along a network where in accordance with network protocols it is directed to an appropriate local computer system. There it is received by a NIC associated with the local computer. The NIC stores the network message in a NIC memory until further processing is completed. This is something of a problem due to the small size of most NIC memory and also due to high amount of network traffic through the NIC (the volume of which is constantly increasing).
In order to avoid overflowing the NIC memory, once the NIC has received and stored the network message, the NIC sends the message to the kernel layer of the computer for processing. The network message is sent to a NIC driver via the I/O bus. This is another of the bottlenecks in current system and contributes substantially to network processing overhead. In order to communicate the network message to the kernel layer the message must be processed by the driver (in the kernel layer). In order to transfer the network message from the NIC to the kernel the message must be transmitted through a standard I/O bus. The difficulty is that such standardized I/O busses transmit data in a series of “packets” (also referred to as “frames”) of 1500 bytes. These packets can be, for example, 1500 byte Ethernet packets. For longer messages, the overhead involved in sending streams of packets is considerable. Thus, it is slow to send packets to the kernel.
Additionally, once the network message is processed by the driver layer and the data link header (e.g., an Ethernet header) is split off and decoded by a data link layer the message is placed in a kernel buffer using a direct memory access (DMA) process. This has the advantage of freeing the NIC memory for additional messages. However, there is a trade-off involved here. About one third of all of the network overhead involved in processing a message from a NIC until it reaches its intended final user buffer (associated with the intended und use application) is incurred here. Thus DMA processing from the NIC to a kernel buffer is a very time intensive process.
Additionally, once a network message is DMA'ed to a kernel buffer, the various headers must be decoded. This process is commonly referred to a header processing. Typically, the kernel layer includes a series of header processing layers that enable the decoding of associated headers in the network message. For example, a transport layer is configured to decode transport headers (e.g., TCP headers and the like) and a network layer is configured to decode network headers (e.g., IP headers and the like). Additionally, an upper layer protocol (ULP) layer is provided to enable decoding of ULP headers (e.g., NFS headers and the like).
Once the headers have been decoded and the data package has been defined and its user (destination application) determined the socket layer again DMA's the data from the kernel buffer to a user buffer associated with the destination application. Thus, even more valuable CPU cycles are expended in this copy from kernel buffer to user buffer.
Performance analysis has determined that such DMA data copying accounts for 30-60% of the total network processing overhead. Thus, many approaches have been attempted to solve this problem. Reductions of these issues will have significant impact CPU availability and significantly increase the number of CPU cycles available for application processing.
One approach that has been used to reduce this the amount of overhead involved in header processing and copying is the introduction of the TCP Offload Engine (TOE) into a standard NIC. Such TOE capable NIC's include decoder hardware capable of conducting TCP and IP processing directly on the NIC. Thus, instead of using the software of the kernel layer to conduct TCP/IP processing the hardware of the TOE NIC conducts the processing. Not only is the burden of TCP/IP processing removed from the CPU, but the TOE NIC hardware performs such processing faster. This represents a significant improvement in the art. Thus, such TOE capable NIC's remove the burden of TCP/IP processing from the kernel. Moreover, message traffic between the TOE NIC and the driver is no longer limited to 1500 byte packets. Such TOE NIC's can use message-based communications to transfer greater amounts of data between the TOE NIC and the driver. This also reduces the overhead. Examples of such TCP Offload Engines and their application to network interface cards are known to those of ordinary skill. For example, reference is made to U.S. patent application Ser. No. 10/884,791 entitled: “System And Method For Conducting Fast Offloading Of A Connection Onto A Network Interface Card” filed on Jul. 1, 2004 which is hereby incorporated by reference.
Even with the improvements made possible with TOE NIC cards, the steadily increasing amounts of network traffic makes further reductions in network processing overhead advantageous. Others have tried to incorporate the ULP layer into a NIC in much the same way that was done for TCP/IP processing. Up to a point this approach can work. However, this approach suffers from a serious drawback. Because the ULP decoder is hard wired, a different NIC is required for each ULP used by the computer system. Moreover, there are many different kinds of ULP's with new ULP's being devised all the time. Thus, the practical implementations of such an approach are significant.
Additionally, no approaches have yet been devised that can overcome the difficulties presented by the copying of the message data from the kernel buffer to the user buffer. A host of problems known to those having ordinary skill in the art have required that the network message first be DMA'ed to the kernel buffer before being copied to a user buffer. This copying imposes significant overhead on network message processing. One problem in particular is imposed by the need to decode the ULP header before transferring a message. For example, applications commonly define messages at the application level and encapsulate them in a ULP dependent format. Due to fragmentation like disruption of messages IP datagrams carrying application level messages are not “self-identifiable” as to which ULP transactions they belong to. Consequently, when such messages are received they cannot be reassembled back into appropriate ULP messages without being ULP aware. Thus, network packets must be placed in network buffers first. Then, after complete network stack processing (decoding), commonly all the way until the ULP header, can the application data be correctly extracted and interpreted from the network packets and copied to the final destination (e.g., a user buffer).
Thus, for at least these reasons, as well as other reasons, there is a need in the art for alternative approaches for network message processing that can reduce the overhead in network message processing.